package com.ssy.lingxi.order.api.model.openapi.request;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 * 供应商 - 订单发货确认接口参数
 * @author 万宁
 * @version 2.0.0
 * @date 2021-10-16
 */
public class OpenApiOrderDeliveryVO implements Serializable {
    private static final long serialVersionUID = 6023523563640982245L;

    /**
     * 订单Id
     */
    @NotNull(message = "订单Id要大于0")
    @Positive(message = "订单Id要大于0")
    private Long orderId;

    /**
     * 发货地址
     */
    @NotBlank(message = "发货地址不能为空")
    @Size(max = 200, message = "发货地址最长200个字符")
    private String address;

    /**
     * 发货时间，格式为yyyy-MM-dd HH:mm:ss，如为空则表示当前时间
     */
    private String deliveryTime;

    /**
     * 物流单号
     */
    @Size(max = 50, message = "物流单号最长50个字符")
    private String logisticsNo;

    /**
     * 物流公司
     */
    @Size(max = 200, message = "物流公司名称最长200个字符")
    private String company;

    /**
     * 发货商品和数量列表
     */
    @NotEmpty(message = "发货商品不能为空")
    @Valid
    private List<OpenApiOrderDeliveryProductVO> products;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(String deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getLogisticsNo() {
        return logisticsNo;
    }

    public void setLogisticsNo(String logisticsNo) {
        this.logisticsNo = logisticsNo;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public List<OpenApiOrderDeliveryProductVO> getProducts() {
        return products;
    }

    public void setProducts(List<OpenApiOrderDeliveryProductVO> products) {
        this.products = products;
    }
}
